package com.cyw.baselibrary.utils;



import java.util.List;

/**
 * Created by Administrator on 2017/3/29.
 */

public class ListUtils {
    /**
     * 判断list 是否为空 ，为空返回true，不为空返回 false
     *
     * @param list
     * @return
     */
    public static boolean isEmpty(List list) {
        if (list != null && list.size() > 0) {
            return false;
        }
        return true;
    }

    public static int getSize(List list) {
        return list == null ? 0 : list.size();
    }

    public static boolean sizeEquals(List list1, List list2) {
        return getSize(list1) == getSize(list2);
    }
}
